import PropTypes from 'prop-types'
import React, { memo } from 'react'
import { HomeSectionWrapper } from './style'
import SectionHeader from '@/components/section-header'
import RoomList from '@/components/room-list'

const HomeSection = memo((props) => {
  const { data } = props
  return (
    <HomeSectionWrapper>
      <SectionHeader title={data?.title} subtitle={data.subtitle}></SectionHeader>
      <RoomList list={data?.list}></RoomList>
    </HomeSectionWrapper>
  )
})

HomeSection.propTypes = {
  data: PropTypes.object
}

export default HomeSection